﻿using System.Collections.Specialized;

namespace ActivateYourGlutes.Model.Internal
{
    public partial class Goal
    {
        public NameValueCollection Validate()
        {
            var errors = new NameValueCollection();
            if (MeasurementType == null)
                errors.Add("MeasurementType","A goal must be assigned to a measurement type");
            else
                MeasurementType.ValidateValue(TargetValue, errors);
            return errors;
        }
    }
}
